<template>
	<view class="wanl-money">
		<NavTitle titleKey="commonTitle.Go币" />
		<view class="bg-orange padding-bj">
			<text class="title">{{$t('pages.user.money.余额')}}</text>
			<view class="margin-top margin-bottom-xs">
				<text class="text-sl">{{go_money}}</text>
			</view>
		</view>
		<!-- 功能 -->
		<view class="cu-list menu sm-border">
			<view class="cu-item arrow" @tap="$wanlshop.to('/pages/user/money/goList')">
				<view class="content">
					<text class="wlIcon-yue1 text-orange"></text>
					<text> {{$t('pages.user.money.账单明细')}}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
import { mapState } from 'vuex';
export default {
	data() {
		return {
			go_money:"0.00"
		};
	},
	computed: {
		...mapState(['user'])
	},
	onLoad() {
		this.loadData();
	},
	methods: {
		async loadData() {
			await uni.request({
				url: '/wanlshop/pay/getBalance',
				data:{type:2},
				method: 'POST',
				success: res => {
					this.go_money = res.data;
				}
			});
		}
	}
};
</script>

<style>
.wanl-money .title{
	color: rgba(255, 255, 255, .7);
}
</style>
